package demo4.controller;

import demo4.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserController {
    @Autowired
    private IUserService userService;
    public void doLogin(){
        System.out.println("UserController:接收到用户登录信息");
        System.out.println("UserController:获取用户登录信息");
        boolean success = userService.login("张三", "123545");
        if (success){
            System.out.println("UserController:向用户响应登录成功页面");
        }else {
            System.out.println("UserController:向用户响应登录失败页面");
        }
    }
}
